--[[
  class: Game.EntityBlock

  Studio block entity class.
]]


--[[
  int: id

  The block prop index.

  Data Type: int::
  Access: Read-Only::

  Notes:
    - The list of all prop indices can be found in `voxelprop.json` file
    at latest *strike.nar archive file.
    For example, XOR logic gate prop index is 966.
]]
Game.EntityBlock.id


--[[
  table: position

  The block spawn position.

  Data Type: table / <~Virtual Table.vector3D>::
  Access: Read-Only::
]]
Game.EntityBlock.position


--[[
  bool: onoff

  The block active/inactive state.

  Data Type: bool::
  Access: Read-Only::

  Options:
    true  - Active / Turned on.
    false - Inactive / Turned off.
]]
Game.EntityBlock.onoff


--[[
  method: Create

  Get the <Game.EntityBlock> entity at given position.

  Access: Read-Only::

  Parameters:
    position - (*table / <~Virtual Table.vector3D>*) Position to get at.

  Returns:
    (*<Game.EntityBlock> / nil*) The studio block entity instance (nil = Not found).
]]
function Game.EntityBlock.Create (position)


--[[
  method: Event

  Raise an event on this studio block entity with given arguments.

  Access: Read-Only::

  Parameters:
    arg   - (*table / <~Virtual Table.GameEntityBlockEventArg>*) Event arguments to raise.
    index - (*int / nil*) The caller entity index, usually done by players (nil = No caller entity).
]]
function Game.EntityBlock:Event (arg, index)


--[[
  event: OnUse

  --- Lua
  function Game.EntityBlock:OnUse (player)
  ---

  Called when "use" event is raised with player USE command or <Game.EntityBlock.Event>.

  Access: Write-Only::

  Parameters:
    player - (*Game.Player / nil*) The caller entity (nil = Is not a player).
]]


--[[
  event: OnTouch

  --- Lua
  function Game.EntityBlock:OnTouch (player)
  ---

  Called when "touch" event is raised by touching player or with <Game.EntityBlock.Event>.

  Access: Write-Only::

  Parameters:
    player - (*Game.Player / nil*) The caller entity (nil = Is not a player).
]]

